
<style type="text/css">
.tab-pane.active{position:relative;margin:0 15px;}
.tab-pane.active .tabright{position:absolute;right:0;top:-43px;right:0;}
</style>
<link rel="stylesheet" type="text/css" href="/public/store/webuploader.css" />
<ol style="overflow: hidden" class="breadcrumb">
    <li class="active"><a href="#">录入订单</a></li>
    <br>
    <label style="float: left;margin-top: 3px;color: #2f3844;" for="searchStr">搜索：&nbsp</label>
    <input style="float: left;width: 80%" id="searchStr" placeholder="拼音首字母（拼音小写）" class="form-control">
    <a href="#searchGoodList" role="presentation" class="btn btn-default" style="color:black !important;margin-left: 10px" id="search_a">
        <span  class="glyphicon glyphicon-search"></span>搜索
    </a>
</ol>
<!-- seat end -->
<div class="row">
    <!-- rightcont start -->
    <div id="good_content" style="width: 70%;float: left"></div>

    <div id="order_good" class="add_goods">
        <!--<p><label for="is_member">是否是会员</label><input id="is_member" type="checkbox"></p>-->
        <p id="roomId_p"><label for="roomId">包厢号</label><input id="roomId" class="form-control"></p>
        <div id="right_sidebar_top"></div>
        <p>总金额:会员<span id="member_total">0</span>元&nbsp/&nbsp普通:<span id="common_total">0</span>元</p>
        <label for="message">备注信息</label>
        <textarea class="form-control" id="message"></textarea>
        <button class="btn btn-default add_goods_btn" id="create_order">下单</button>
    </div>
    <!-- rightcont end -->
</div>

<!--导航条部分模板-->
<script type="text/html" id="good_content_tmpl">
    <ul class="nav nav-tabs gn_tabs">
        <ul class="nav nav-tabs">
            {{each typeList as vo i}}
            <li role="presentation"><a href="{{'#type'+vo.id}}">{{vo.goodsTypeName}}</a></li>
            {{/each}}
        </ul>
    </ul>
    <div class="tab-content">
        <div url="saleGoodsList" role="tabpanel" class="tab-pane active" id="goods"></div>
        {{each typeList as vo i}}
        <div url="saleGoodsList" role="tabpanel" class="tab-pane" data-goods-type-id="{{vo.id}}" id="{{'type'+vo.id}}"></div>
        {{/each}}
        <div url="saleGoodsList" role="tabpanel" class="tab-pane" data-goods-name-content="" id="searchGoodList"></div>
    </div>
</script>

<!--商品列表部分模板-->
<script type="text/html" id="goods_tmpl">
    <table class="table table-bordered from_table">
        <tr>
            <th class="text-center" nowrap>名称</th>
            <th class="text-center" nowrap>图片</th>
            <th class="text-center" nowrap>售价</th>
            <th class="text-center" nowrap>会员价</th>
            <th class="text-center" nowrap>库存</th>
            <th class="text-center" nowrap>操作</th>
        </tr>
        {{each dataList as vo i}}
        <tr>
            <td>{{vo.goodsName}}</td>
            <td class="text-center"><img src="{{vo.goodsLogo}}" style="max-height:100px;max-width:100px;" /></td>
            <td>￥{{(vo.goodsCommonPrice/100).toFixed(2)}}/{{vo.units}}</td>
            <td>￥{{(vo.goodsMemberPrice/100).toFixed(2)}}/{{vo.units}}</td>
            {{if vo.units=="斤"}}
                <td>{{(vo.goodsNumber/500).toFixed(2)}}{{vo.units}}</td>
            {{else}}
                <td>{{(vo.goodsNumber)}}{{vo.units}}</td>
            {{/if}}
            <td class="text-center">
                <span class="btn btn-primary" name="addGoods" id="{{'add_good'+vo.goodsId}}" data-good-id="{{vo.goodsId}}" data-i="{{i}}">加入订单</span>
            </td>
        </tr>
        {{/each}}
    </table>


    {{if totalPage>1}}
    <nav class="text-right">
        <ul class="pagination">
            {{if pageNumber>1}}
            <li>
                <a href="{{pageNumber-1}}" aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
            </li>
            {{/if}}
                {{for var i = pageNumber-5; i < pageNumber + 5; i++}}
                    {{if i>0 && i <= totalPage}}
                    <li {{if i == pageNumber}} class="active" {{/if}} ><a href="{{i}}">{{i}}</a></li>
                    {{/if}}
                {{/for}}
            {{if pageNumber<totalPage}}
            <li>
                <a href="{{pageNumber+1}}" aria-label="Next">
                    <span aria-hidden="true">下一页</span>
                </a>
            </li>
            {{/if}}
        </ul>
    </nav>
    {{/if}}
</script>

<!--右侧点单列表用，商品模板-->
<script type="text/html" id="right_sidebar_good">
    <div id="{{'order_good'+good.goodsId}}"
         data-goods-id="{{good.goodsId}}"
         data-goods-name="{{good.goodsName}}"
         data-goods-count="{{good.count}}"
         data-goods-note="{{good.goodsNote}}"
         data-goods-member-price="{{good.goodsMemberPrice}}"
         data-goods-common-price="{{good.goodsCommonPrice}}"
         data-member-sum="{{good.member_sum}}"
         data-common-sum="{{good.common_sum}}"
         data-goods-logo="{{good.goodsLogo}}"
         data-units="{{good.units}}">
            <p style="text-align: center;font-size:x-large">{{good.goodsName}}</p>
            <!--<p>购买数量：{{good.count}}</p>-->
            {{if good.units!='斤'}}
                <span name="{{good.goodsId}}"  class="glyphicon glyphicon-plus"></span>
                <span name="good_count"  id="{{good.goodsId}}">{{good.count}}</span>{{good.units}}
                <span name="{{good.goodsId}}" class="glyphicon glyphicon-minus"></span>
            {{else}}
                <input name="good_count" type="number" class="good_count form-control" id="{{good.goodsId}}" value="{{good.count}}">{{good.units}}
            {{/if}}
            &nbsp&nbsp|&nbsp&nbsp<span name="member_sum">{{(good.member_sum/100).toFixed(2)}}</span>元/<span name="common_sum">{{(good.common_sum/100).toFixed(2)}}</span>元
        <p>
            备注：<input name="good_note" class="form-control good_note" data-good-id="{{good.goodsId}}" value="{{good.goodsNote}}">
        </p>
        <!--<p>小计：会员&nbsp/&nbsp普通</p>-->
    </div>
</script>


<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

